#include "function.h"
#include "ui_function.h"

function::function(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::function)
{
    ui->setupUi(this);
    this->pvideoDetect = new videoDetect;
    this->pworkCheck = new workCheck;

    connect(this->pvideoDetect,&videoDetect::back,[=](){
        this->pvideoDetect->hide();
        this->show();
    });

    connect(this->pworkCheck,&workCheck::back,[=](){
        this->pworkCheck->hide();
        this->show();
    });

    //Mat image=imread("C:/Users/vivi134/Desktop/Photos/test.jpg",1);
    //namedWindow("Display window", WINDOW_AUTOSIZE );
    //imshow( "Display window", image );
}

function::~function()
{
    delete ui;
}


void function::on_exit_clicked()
{
    exit(0);
}

void function::on_detect_clicked()
{
    this->hide();
    this->pvideoDetect->show();
}

void function::on_card_clicked()
{
    this->hide();
    this->pworkCheck->show();
}
